home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 2002-10-03 | 66.0 KB | 1,255 lines
MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) NNNNAAAAMMMMEEEE mailx - send and receive mail SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS Send Mode: mmmmaaaaiiiillllxxxx [ ----vvvv ] [ ----ssss _s_u_b_j_e_c_t ] [ _a_d_d_r_e_s_s... ] Receive Mode: mmmmaaaaiiiillllxxxx ----eeee mmmmaaaaiiiillllxxxx [ ----HHHHiiiiNNNNnnnn ] [ ----FFFF ] [ ----uuuu _u_s_e_r ] mmmmaaaaiiiillllxxxx ----ffff [ ----HHHHiiiiNNNNnnnn ] [ ----FFFF ] [ _f_i_l_e ] IIIINNNNTTTTRRRROOOODDDDUUUUCCCCTTTTIIIIOOOONNNN _m_a_i_l_x is an interactive mail processing system, which has a command syntax reminiscent of _e_d with lines replaced by messages. Send Mode can be used by applications or users to send messages from the text in standard input. Receive Mode is more oriented to interactive users. Mail can be read and sent in this interactive mode. When reading mail, _m_a_i_l_x provides commands to facilitate saving, deleting and responding to messages. When sending mail, _m_a_i_l_x allows editing, reviewing and other modification of the message as it is entered. Incoming mail is stored in one or more unspecified locations for each user, collectively called the system mailbox for that user. When _m_a_i_l_x is invoked in Receive Mode, the system mailbox is the default place to find them. As messages are read, they will be marked to be moved to a secondary file for storage, unless specific action is taken. This secondary file is called the mmmmbbbbooooxxxx and is normally located in the HHHHOOOOMMMMEEEE directory of the user. When the ----ffff option is used to read mail messages from secondary files, messages will be retained in those files unless specifically removed. All three of these locations system mailbox, mmmmbbbbooooxxxx and secondary file are referred to in this section as simply ``mailboxes,'' unless more specific identification is required. _m_a_i_l_x conforms to the X/Open _C_o_m_m_a_n_d_s _a_n_d _U_t_i_l_i_t_i_e_s _S_p_e_c_i_f_i_c_a_t_i_o_n_s _I_s_s_u_e _4, _V_e_r_s_i_o_n _2 document. OOOOPPPPTTTTIIIIOOOONNNNSSSS ----eeee Test for the presence of mail in the system mailbox. The _m_a_i_l_x utility will write nothing and exit with a successful return code if there is mail to read. ----ffff Read messages from the file named by the _f_i_l_e operand instead of the system mailbox. ----FFFF Record the message in a file named after the first recipient. The name is the login-name portion of the address found first on the To: line in the mail header. Overrides the rrrreeeeccccoooorrrrdddd variable, if set. PPPPaaaaggggeeee 1111 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) ----HHHH Write a header summary only. ----vvvv flag puts _m_a_i_l_x into verbose mode; the details of delivery are displayed on the users terminal. ----iiii flag causes tty interrupt signals to be ignored. This is particularly useful when using _m_a_i_l_x on noisy phone lines. ----nnnn flag inhibits the reading of /usr/lib/Mail.rc. ----NNNN Do not write an initial header summary. ----uuuu Read the system mailbox of the login name _u_s_e_r. This will only be successful if the invoking user has the appropriate privileges to read the system mailbox of that user. _S_e_n_d_i_n_g _m_a_i_l. To send a message to one or more other people, _m_a_i_l_x can be invoked with arguments which are the names of people to send to. You are then expected to type in your message, followed by an EOT (control-D) at the beginning of a line. A subject may be specified on the command line by using the ----ssss flag. (Only the first argument after the ----ssss flag is used as a subject; be careful to quote subjects containing spaces.) The section below, labeled _R_e_p_l_y_i_n_g _t_o _o_r _o_r_i_g_i_n_a_t_i_n_g _m_a_i_l, describes some features of _m_a_i_l_x available to help you compose your letter. _R_e_a_d_i_n_g _m_a_i_l. In normal usage _m_a_i_l_x is given no arguments. It checks your mail out of your system mailbox, then prints out a one line summary of each message there. The current message is initially the first message (numbered 1) and can be printed using the pppprrrriiiinnnntttt command (which can be abbreviated pppp). You can move among the messages much as you move between lines in _e_d, with the commands `+' and `-' moving backwards and forwards, and simple numbers. _D_i_s_p_o_s_i_n_g _o_f _m_a_i_l. After examining a message you can ddddeeeelllleeeetttteeee (dddd) the message or rrrreeeeppppllllyyyy (rrrr) to it. Deletion causes the _m_a_i_l_x program to forget about the message. This is not irreversible; the message can be uuuunnnnddddeeeelllleeeetttteeeedddd (uuuu) by giving its number, or the _m_a_i_l_x session can be aborted by giving the eeeexxxxiiiitttt (xxxx) command. Deleted messages will, however, usually disappear never to be seen again. _S_p_e_c_i_f_y_i_n_g _m_e_s_s_a_g_e_s. Commands such as pppprrrriiiinnnntttt ddddeeeelllleeeetttteeee and ffffrrrroooommmm can be given a list of messages as an argument in order to apply to a number of messages at once. This list of messages can be specified in one of three mutually exclusive ways: First, messages may be specified by message number. Thus ``delete 1 2'' deletes messages 1 and 2, while ``delete 1-5'' deletes messages 1 through 5. In conjunction with message numbers, the following special names may also be used: The special name `^' addresses the first message, and `$' addresses the last message. PPPPaaaaggggeeee 2222 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) Second, messages may be specified by sender's name, sender's name substring or subject substring. You may supply a list of whitespace separated message senders' names and/or message senders' names substrings and/or message subject substrings to commands accepting message lists. A message sender's name is a string of characters which must begin with an alphabetic character, and must match exactly the sender's name in the target message. A message sender's name substring is a `?' character immediately followed (no whitespace) by a string of characters and specifies all messages with a sender's name containing the character string as a substring. A message subject is a `/' character immediately followed (no whitespace) by a string of characters and specifies all messages with a subject line containing the character string as a substring. Examples: ``from foo'' lists all messages from ``foo'' exactly, while ``from /foo'' lists all messages with substring ``foo'' in their subject lines and ``from ?foo'' lists all messages with substring foo in their senders' names. Third, the special name `*' can be used to address all messages. Thus the command ttttoooopppp which prints the first few lines of a message could be used as ``top *'' to print the first few lines of all messages. _R_e_p_l_y_i_n_g _t_o _o_r _o_r_i_g_i_n_a_t_i_n_g _m_a_i_l. You can use the rrrreeeeppppllllyyyy command to set up a response to a message, sending it back to the person who it was from. Text you then type in, up to an end-of-file, defines the contents of the message. While you are composing a message, _m_a_i_l_x treats lines beginning with the character `~' specially. For instance, typing ``~m'' (alone on a line) will place a copy of the current message into the response right shifting it by a tabstop. Other escapes will set up subject fields, add and delete recipients to the message and allow you to escape to an editor to revise the message or to a shell to run some commands. (These options are given in the summary below.) _I_n_c_o_r_p_o_r_a_t_i_n_g _n_e_w _m_a_i_l. You can read new mail which has arrived during the session by using the ffffoooollllddddeeeerrrr command to reread your system mailbox. A convenient way to do this is to type the command ``folder %'' or ``fo %''. This will have the same effect as typing the qqqquuuuiiiitttt command to end the session (see below) and then re-invoking _m_a_i_l_x with no arguments. _E_n_d_i_n_g _a _m_a_i_l _p_r_o_c_e_s_s_i_n_g _s_e_s_s_i_o_n. You can end a _m_a_i_l_x session with the qqqquuuuiiiitttt (qqqq) or eeeexxxxiiiitttt (xxxx) commands. If you use the qqqquuuuiiiitttt command, messages which have been examined will be moved to your _m_b_o_x file, messages which have been deleted are discarded, and unexamined messages are copied back to your system mailbox. If you have used the ----ffff option to read in the contents of your _m_b_o_x (or other file) for processing; when you qqqquuuuiiiitttt, _m_a_i_l_x writes undeleted messages back to this file. In the event that _m_a_i_l_x cannot rewrite _m_b_o_x (or other file) to write back messages, _m_a_i_l_x will print a message indicating the trouble and will not exit. This gives you the option of trying to set things right. If things cannot be set right, you can escape _m_a_i_l_x by using the eeeexxxxiiiitttt command described below. PPPPaaaaggggeeee 3333 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) If you use the eeeexxxxiiiitttt command, _m_a_i_l_x exits without making any modifications to the mail file. Deleted messages will not be discarded. _P_e_r_s_o_n_a_l _a_n_d _s_y_s_t_e_m_w_i_d_e _d_i_s_t_r_i_b_u_t_i_o_n _l_i_s_t_s. It is also possible to create a personal distribution lists so that, for instance, you can send mail to ``cohorts'' and have it go to a group of people. Such lists can be defined by placing a line like alias cohorts bill ozalp jkf mark kridle@ucbcory in the file .mailrc in your home directory. The current list of such aliases can be displayed with the aaaalllliiiiaaaassss ((((aaaa)))) command in _m_a_i_l_x. System wide distribution lists can be created by editing /usr/lib/Mail.rc (which may contain other _m_a_i_l_x commands such as set). An alias of the form alias bob sauron!bob will be ignored on the sauron system so that the same /usr/lib/Mail.rc or ~/.mailrc file may be used on several machines with correct behavior. You may include a pathname in the distribution list, and _m_a_i_l_x will record outgoing messages in that file. It is preferable to place pathnames and folders in the ``Bcc:'' list, to prevent recipients from replying to a nonexistent filename. _F_o_r_w_a_r_d_i_n_g _m_a_i_l. Forwarding of mail is done via the ._f_o_r_w_a_r_d file mechanism of the _s_e_n_d_m_a_i_l(1M) program. Please see the _s_e_n_d_m_a_i_l(1M) manual page for details. _S_i_g_n_a_t_u_r_e_s. A signature line (or lines) may be automatically appended to the end of all outgoing letters by placing the text in the file .lsignature, .rsignature, or .signature in your home directory. The file .lsignature is used for local mail, that is the recipients specified do not have `!' or `@' in their names (prior to aliasing) and the file .rsignature is used for remote mail. If the appropriate one of these does not exist, .signature is used for compatibility with previous versions of _m_a_i_l_x. _m_a_i_l_x has a number of options which can be set in the ._m_a_i_l_r_c file to alter its behavior; thus ``set askcc'' enables the ``askcc'' feature. (These options are summarized below.) SSSSUUUUMMMMMMMMAAAARRRRYYYY Each command is typed on a line by itself, and may take arguments following the command word. The command need not be typed in its entirety - the first command which matches the typed prefix is used. For commands which take message lists as arguments, if no message list is given, then the next message forward which satisfies the command's requirements is used. If there are no messages forward of the current message, the search proceeds backwards, and if there are no good messages at all, _m_a_i_l_x types ``No applicable messages'' and aborts the command. PPPPaaaaggggeeee 4444 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) !!!! Executes the UNIX shell command which follows. ---- Goes to the previous message and prints it out. ==== Prints the current message number. ???? If the qqqqmmmmaaaarrrrkkkkiiiisssshhhheeeellllpppp option is set (see below), this is a synonym for the hhhheeeellllpppp command. Otherwise, ???? indicates the start of a sender's name substring message list (see ``Specifying messages'' above). MMMMoooorrrreeee (MMMM) Like PPPPrrrriiiinnnntttt but invokes your pager. NNNNeeeewwww (NNNN) Identical to the uuuunnnnrrrreeeeaaaadddd command. PPPPaaaaggggeeee (PPPPaaaa) A synonym for MMMMoooorrrreeee.... PPPPrrrriiiinnnntttt (PPPP) Like pppprrrriiiinnnntttt but also prints out ignored header fields. See also pppprrrriiiinnnntttt and iiiiggggnnnnoooorrrreeee.... RRRReeeeppppllllyyyy (RRRR) Reply to originator. Does not reply to other recipients of the original message. RRRReeeessssppppoooonnnndddd (RRRReeeessss) A synonym for RRRReeeeppppllllyyyy TTTTyyyyppppeeee (TTTT) Identical to the PPPPrrrriiiinnnntttt command. UUUUnnnnrrrreeeeaaaadddd (UUUU) Identical to the uuuunnnnrrrreeeeaaaadddd command. aaaalllliiiiaaaassss (aaaa) With no arguments, prints out all currently-defined aliases. With one argument, prints out that alias. With more than one argument, creates an new or changes an on old alias. aaaalllltttteeeerrrrnnnnaaaatttteeeessss (aaaalllltttt) The aaaalllltttteeeerrrrnnnnaaaatttteeeessss command is useful if you have accounts on several machines. It can be used to inform _m_a_i_l_x that the listed addresses are really you. When you rrrreeeeppppllllyyyy to messages, _m_a_i_l_x will not send a copy of the message to any of the addresses listed on the _a_l_t_e_r_n_a_t_e_s list. If the aaaalllltttteeeerrrrnnnnaaaatttteeeessss command is given with no argument, the current set of alternate names is displayed. cccchhhhddddiiiirrrr (ccccdddd) Changes the user's working directory to that specified, if given. If no directory is given, then changes to the contents of _HHHH_OOOO_MMMM_EEEE will be used. ccccooooppppyyyy (cccc) The ccccooooppppyyyy command does the same thing that ssssaaaavvvveeee does, except that it does not mark the messages it is used on for deletion when you quit. PPPPaaaaggggeeee 5555 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) CCCCooooppppyyyy (CCCC) The CCCCooooppppyyyy command does the same thing that ccccooooppppyyyy does, except that it uses the file named from the author of the message to be saved. ddddeeeelllleeeetttteeee (dddd) Takes a list of messages as argument and marks them all as deleted. Deleted messages will not be saved in _m_b_o_x, nor will they be available for most other commands. ddddiiiissssccccaaaarrrrdddd (ddddiiii) A synonym for iiiiggggnnnnoooorrrreeee (iiiigggg). ddddpppp (also ddddtttt) Deletes the current message and prints the next message. If there is no next message, _m_a_i_l_x says ``at EOF.'' eeeecccchhhhoooo (eeeecccc) Takes a string and echos it to standard output. eeeeddddiiiitttt (eeee) Takes a list of messages and points the text editor at each one in turn. On return from the editor, the message is read back in. eeeexxxxiiiitttt (eeeexxxx or xxxx) Effects an immediate return to the Shell without modifying the user's system mailbox, his _m_b_o_x file, or his edit file in ----ffff. ffffiiiilllleeee (ffffiiii) The same as ffffoooollllddddeeeerrrr. ffffoooollllddddeeeerrrr (ffffoooolllldddd) The ffffoooollllddddeeeerrrr command switches to a new mail file or folder. With no arguments, it tells you which file you are currently reading. If you give it an argument, it will write out changes (such as deletions) you have made in the current file and read in the new file. Some special conventions are recognized for the name. @ means the current file in read- only mode, $ means the current file, in read/write mode if possible, # means the previous file, % means your system mailbox, %user means user's system mailbox, & means your ~/mbox file, and +folder means a file in your folder directory. Issuing the command ``folder %'' while you are reading your system mailbox is a convenient way to incorporate new mail which has arrived during the session. ffffoooollllddddeeeerrrrssss List the names of the folders in your folder directory. ffffoooolllllllloooowwwwuuuupppp (ffffoooo) Respond to a message, recording the response in a file whose name is derived from the author of the message. Overrides the rrrreeeeccccoooorrrrdddd variable, if set. See also the ssssaaaavvvveeee and ccccooooppppyyyy commands and oooouuuuttttffffoooollllddddeeeerrrr.... FFFFoooolllllllloooowwwwuuuupppp (FFFF) Respond to the first message in the _m_s_g_l_i_s_t, sending the message to the author of each message in the _m_s_g_l_i_s_t. The subject line is taken from the first message and the response is recorded in a file whose name is derived from the author PPPPaaaaggggeeee 6666 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) of the first message. See also the Save and Copy commands and oooouuuuttttffffoooollllddddeeeerrrr.... ffffrrrroooommmm (ffff) Takes a list of messages and prints their summary lines. See the _S_p_e_c_i_f_y_i_n_g _m_e_s_s_a_g_e_s section above for examples of how to use this command to list only the messages from a particular person, or about a particular subject. ggggrrrroooouuuupppp (gggg) A synonym for aaaalllliiiiaaaassss.... hhhhdddd Lists the message summary lines of all deleted messages. These are the messages that have been deleted by the ddddeeeelllleeeetttteeee command, but that have not yet been removed from the mailbox. These messages may be undeleted by use of the uuuunnnnddddeeeelllleeeetttteeee command. hhhheeeeaaaaddddeeeerrrrssss (hhhh) Lists the current group of message summary lines (historically called "headers"). Summary lines are grouped and displayed by windowfuls (as many lines as will fit in the window). If there are more summary lines than will fit in the current window, the zzzz command can be used to scroll through multiple summary line groups. hhhheeeellllpppp (hhhheeeellll) Prints a brief summary of commands. hhhhoooolllldddd (hhhhoooo, also pppprrrreeeesssseeeerrrrvvvveeee (pppprrrreeee)) Takes a message list and marks each message therein to be saved in the user's system mailbox instead of in _m_b_o_x. Does not override the ddddeeeelllleeeetttteeee command. iiiiggggnnnnoooorrrreeee (iiiigggg) Add the list of header fields named to the _i_g_n_o_r_e_d _l_i_s_t. Header fields in the ignore list are not printed on your terminal when you print a message. This command is very handy for suppression of certain machine-generated header fields. The TTTTyyyyppppeeee and PPPPrrrriiiinnnntttt commands can be used to print a message in its entirety, including ignored fields. If iiiiggggnnnnoooorrrreeee is executed with no arguments, it lists the current set of ignored fields. lllliiiisssstttt (lllliiii) Prints the list of all _m_a_i_l_x commands. mmmmaaaaiiiillll (mmmm) Takes as argument login names and distribution group names and sends mail to those people. mmmmbbbbooooxxxx (mmmmbbbb) Indicate that a list of messages be sent to _m_b_o_x in your home directory when you quit. This is the default action for messages if you do _n_o_t have the _h_o_l_d option set. See MMMMBBBBOOOOXXXX.... mmmmoooorrrreeee (mmmmoooo) Like pppprrrriiiinnnntttt but invokes your pager. nnnneeeewwww Identical to the uuuunnnnrrrreeeeaaaadddd command PPPPaaaaggggeeee 7777 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) nnnneeeexxxxtttt (nnnn like ++++ or CR) Goes to the next message in sequence and types it. With an argument list, types the next matching message. ppppaaaaggggeeee (ppppaaaa) A synonym for mmmmoooorrrreeee.... _pppp_iiii_pppp_eeee or _|||| (ppppiiii) Pipe the messages through the given _c_o_m_m_a_n_d by invoking the command interpreter specified by _S_H_E_L_L with two arguments: cccc and _c_o_m_m_a_n_d. (See also _s_h (_----_cccc.) The command must be given as a single argument. Quoting, described previously, can be used to accomplish this. If no arguments are given, the current message will be piped through the command specified by the value of the ccccmmmmdddd variable. If the ppppaaaaggggeeee variable is set, a form-feed character will be inserted after each message. pppprrrreeeesssseeeerrrrvvvveeee (pppprrrreeee) A synonym for hhhhoooolllldddd. _pppp_rrrr_iiii_nnnn_tttt or _tttt_yyyy_pppp_eeee (pppp or tttt) Takes a message list and types out each message to standard output. If ccccrrrrtttt is set, the messages longer than the number of lines specified by the ccccrrrrtttt variable will be paged through the command specified by the PPPPAAAAGGGGEEEERRRR environment variable. qqqquuuuiiiitttt (qqqq) Terminates the session, saving all undeleted, unsaved messages in the user's _m_b_o_x file in his login directory, preserving all messages marked with hhhhoooolllldddd or pppprrrreeeesssseeeerrrrvvvveeee or never referenced in his system mailbox, and removing all other messages from his system mailbox. If new mail has arrived during the session, the message ``You have new mail'' is given. If given while editing a mailbox file with the ----ffff flag, then the edit file is rewritten. A return to the Shell is effected, unless the rewrite of edit file fails, in which case the user can escape with the eeeexxxxiiiitttt command. rrrreeeeppppllllyyyy (rrrr) A synonym for RRRReeeeppppllllyyyy. rrrreeeeppppllllyyyyaaaallllllll (rrrraaaa or RRRRAAAA) Takes a message list and sends mail to the sender and all recipients of the specified message. The default message must not be deleted. rrrreeeessssppppoooonnnndddd (rrrreeeessss) A synonym for RRRReeeeppppllllyyyy. ssssaaaavvvveeee (ssss) Takes a message list and a filename and appends each message in turn to the end of the file. The filename in quotes, followed by the line count and character count is echoed on the user's terminal. If filename does not already exist it will be created. If filename begins with a ``|'' or ``!'' then it will be interpreted as a shell command and the contents of the messages passed to it on standard input. PPPPaaaaggggeeee 8888 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) SSSSaaaavvvveeee (SSSS) Takes a message list and appends each message in a file whose name is derived from the author of the first message. See also the _CCCC_oooo_pppp_yyyy, _ffff_oooo_llll_llll_oooo_wwww_uuuu_pppp and _FFFF_oooo_llll_llll_oooo_wwww_uuuu_pppp commands and _oooo_uuuu_tttt_ffff_oooo_llll_dddd_eeee_rrrr variable. sssseeeetttt (sssseeee) With no arguments, prints all variable values. Otherwise, sets option. Arguments are of the form ``option=value'' or ``option.'' sssshhhheeeellllllll (sssshhhh) Invokes an interactive version of the shell. ssssiiiizzzzeeee (ssssiiii) Takes a message list and prints out the size in characters of each message. ssssoooouuuurrrrcccceeee (ssssoooo) The ssssoooouuuurrrrcccceeee command reads _m_a_i_l_x commands from a file. ttttoooopppp (ttttoooo) Takes a message list and prints the top few lines of each. The number of lines printed is controlled by the variable ttttoooopppplllliiiinnnneeeessss and defaults to five. ttttoooouuuucccchhhh (ttttoooouuuu) Takes a message list and causes each message therein to be saved in either the user's system mailbox or in _m_b_o_x according to the state of the _h_o_l_d option. ttttyyyyppppeeee (tttt) A synonym for pppprrrriiiinnnntttt. uuuunnnnddddeeeelllleeeetttteeee (uuuu) Takes a message list and marks each one as _n_o_t being deleted. uuuunnnnrrrreeeeaaaadddd (uuuunnnnrrrr or UUUU) Takes a message list and marks each message as _n_o_t having been read. Also see the UUUUnnnnrrrreeeeaaaadddd command. uuuunnnnsssseeeetttt Takes a list of option names and discards their remembered values; the inverse of sssseeeetttt. vvvveeeerrrrssssiiiioooonnnn (vvvveeee) Prints the version number of mailx that you are using. vvvviiiissssuuuuaaaallll (vvvv) Takes a message list and invokes the display editor on each message. wwwwrrrriiiitttteeee (wwww) Like ssssaaaavvvveeee except that the message header and the blank line after the message body are not appended to the file. Only the message body of each message is appended to the file. xxxxiiiitttt (xxxx) A synonym for eeeexxxxiiiitttt. zzzz _m_a_i_l_x presents message summary lines in windowfuls as described under the hhhheeeeaaaaddddeeeerrrr command. You can move _m_a_i_l_x's attention forward to the next window with the zzzz command. Also, you can move to the previous window by using zzzz----. PPPPaaaaggggeeee 9999 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) Here is a summary of the tilde escapes, which are used when composing messages to perform special functions. Tilde escapes are only recognized at the beginning of lines. The name ``tilde escape'' is somewhat of a misnomer since the actual escape character can be set via the eeeessssccccaaaappppeeee option. ~~~~!!!! _c_o_m_m_a_n_d Execute the indicated shell _c_o_m_m_a_n_d, then return to the message. ~~~~:::: _c_o_m_m_a_n_d Execute the indicated _m_a_i_l_x _c_o_m_m_a_n_d, then return to the message. ~~~~???? Display the tilde escape help file. ~~~~bbbb _n_a_m_e ... Add the given _n_a_m_es to the list of blind carbon copy (``Bcc:'') recipients. ~~~~cccc _n_a_m_e ... Add the given _n_a_m_es to the list of carbon copy (``Cc:'') recipients. ~~~~ccccmmmm _s_t_r_i_n_g Cause the _s_t_r_i_n_g to become the current ``Comments:'' field. ~~~~dddd Read the file ``dead.letter'' from your home directory into the message. ~~~~EEEE Invoke the text editor on the entire message collected so far including the message header fields. The existing message header fields will be displayed above a dashed line and the existing message body will be displayed below the dashed line. You are free to edit the message headers and body at will, but you must be careful that the final format of the headers conforms to the RFC 822 standard. You must also take care that no blank lines appear within the header section of the message and that you do not remove the dashed line separating the message headers from the message body. After the editing session is finished, you may continue appending text to the message. ~~~~eeee Invoke the text editor on the body of the message collected so far. After the editing session is finished, you may continue appending text to the message. ~~~~eeeehhhh Same as ~~~~EEEE above. ~~~~eeeennnn _s_t_r_i_n_g Cause the _s_t_r_i_n_g to become the current ``Encrypted:'' field. ~~~~ffff _m_e_s_s_a_g_e_s Read the named _m_e_s_s_a_g_e_s into the message being sent. If no _m_e_s_s_a_g_e_s are specified, read in the current message. PPPPaaaaggggeeee 11110000 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) ~~~~HHHH Edit all standard message header fields by typing each one in turn and allowing the user to append text to the end or modify the field by using the current terminal erase and kill characters. ~~~~hhhh Edit the basic message header fields (To:, Subject:, Cc:, Bcc:) by typing each one in turn and allowing the user to append text to the end or modify the field by using the current terminal erase and kill characters. ~~~~iiiirrrrtttt _s_t_r_i_n_g Add the _s_t_r_i_n_g to the ``In-Reply-To:'' list. ~~~~kkkk _s_t_r_i_n_g Add the _s_t_r_i_n_g to the ``Keywords:'' list. ~~~~mmmm _m_e_s_s_a_g_e_s Read the named _m_e_s_s_a_g_e_s into the message being sent shifted right one tab. Note that if the _m_p_r_e_f_i_x option is set (see below), the tab will be replaced with the specified string. If no _m_e_s_s_a_g_e_s are specified, read the current message. ~~~~pppp Print out the message collected so far. First the message header fields are displayed followed by a dashed line separator, then the message body. ~~~~qqqq Abort the message being sent, copying the message to ``dead.letter'' in your home directory. ~~~~rrrr _f_i_l_e Read the named _f_i_l_e into the message. ~~~~rrrrffff _s_t_r_i_n_g Add the _s_t_r_i_n_g to the ``References:'' list. ~~~~rrrrrrrr [_s_t_r_i_n_g] Cause a ``Return-Receipt-To:'' field to be added to the message. If the _s_t_r_i_n_g is specified, it will be added to the list of recipients in the ``Return-Receipt-To:'' field. If the _s_t_r_i_n_g is not specified and no ``Return- Receipt-To:'' field exists in the message, one will be created and your user name will be specified. If the _s_t_r_i_n_g is not specified and a ``Return-Receipt-To:'' field already exists in the message, the entire field will be removed. If the ``Return-Receipt-To:'' header field is present when the message is sent, and if the intervening mail delivery system supports return receipts, a return receipt will be sent to your mailbox when the message is successfully delivered to each of the specified recipients. ~~~~rrrrtttt _n_a_m_e ... Add the given _n_a_m_es to the ``Reply-To:'' list. ~~~~ssss _s_t_r_i_n_g Cause the _s_t_r_i_n_g to become the current ``Subject:'' field. PPPPaaaaggggeeee 11111111 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) ~~~~tttt _n_a_m_e ... Add the given _n_a_m_es to the direct recipients (``To:'') list. ~~~~VVVV Invoke an alternate editor (defined by the _V_I_S_U_A_L option) on the entire message collected so far including the message header fields. The existing message header fields will be displayed above a dashed line and the existing message body will be displayed below the dashed line. You are free to edit the message headers and body at will, but you must be careful that the final format of the headers conforms to the RFC 822 standard. You must also take care that no blank lines appear within the header section of the message and that you do not remove the dashed line separating the message headers from the message body. After the editing session is finished, you may continue appending text to the message. ~~~~vvvv Invoke an alternate editor (defined by the _V_I_S_U_A_L option) on the body of the message collected so far. Usually, the alternate editor will be a screen editor. After you quit the editor, you may resume appending text to the end of your message. ~~~~vvvvhhhh Same as ~~~~VVVV above. ~~~~wwww _f_i_l_e Write the message onto the named _f_i_l_e. ~~~~||||_c_o_m_m_a_n_d Pipe the message through the _c_o_m_m_a_n_d as a filter. If the command gives no output or terminates abnormally, retain the original text of the message. The command _f_m_t(1) is often used as _c_o_m_m_a_n_d to rejustify the message. ~~~~~~~~_s_t_r_i_n_g Insert the _s_t_r_i_n_g into the message prefaced by a single ~. If you have changed the escape character, then you should double that character in order to send it. Options are controlled via the sssseeeetttt and uuuunnnnsssseeeetttt commands. Options may be either binary, in which case it is only significant to see whether they are set or not, or string, in which case the actual value is of interest. The binary options include the following: RRRReeeeppppllllyyyyaaaallllllll Swaps the behavior of the rrrr////RRRReeeeppppllllyyyy////RRRReeeessssppppoooonnnndddd and rrrraaaa////RRRReeeeppppllllyyyyaaaallllllll commands resulting in a more BSD-like interface. aaaappppppppeeeennnndddd Causes messages saved in _m_b_o_x to be appended to the end rather than prepended. (This is set in /usr/lib/Mail.rc on version 7 systems.) aaaasssskkkk////aaaasssskkkkssssuuuubbbb Prompt for a subject line on outgoing mail if one is not specified on the command line with the ----ssss option. The aaaasssskkkk and aaaasssskkkkssssuuuubbbb forms are synonyms; the system will refer to aaaasssskkkkssssuuuubbbb and nnnnooooaaaasssskkkkssssuuuubbbb in its messages, but will accept aaaasssskkkk PPPPaaaaggggeeee 11112222 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) and nnnnooooaaaasssskkkk as user input to mean aaaasssskkkkssssuuuubbbb and nnnnooooaaaasssskkkkssssuuuubbbb.... It is not possible to set both aaaasssskkkk and nnnnooooaaaasssskkkkssssuuuubbbb,,,, or nnnnooooaaaasssskkkk and aaaasssskkkkssssuuuubbbb aaaasssskkkkssssuuuubbbb,,,, but no prompting will be done if standard input is not a terminal. aaaasssskkkkbbbbcccccccc Prompt for the blind copy list. The default is nnnnooooaaaasssskkkkbbbbcccccccc.... aaaasssskkkkcccccccc Causes you to be prompted for additional carbon copy recipients at the end of each message. Responding with a newline indicates your satisfaction with the current list. The default is nnnnooooaaaasssskkkkcccccccc.... aaaauuuuttttoooopppprrrriiiinnnntttt Causes the ddddeeeelllleeeetttteeee command to behave like ddddpppp - thus, after deleting a message, the next one will be typed automatically. bbbbaaaannnngggg Enable the special-case treatment of exclamation-marks (!) in escape command lines; see the eeeessssccccaaaappppeeee command. The default is nnnnoooobbbbaaaannnngggg,,,, disabling the expansion of ! in the _c_o_m_m_a_n_d argument to the !_c_o_m_m_a_n_d and the <!_c_o_m_m_a_n_d escape. ccccmmmmdddd=_c_o_m_m_a_n_d Set the default command to be invoked by the ppppiiiippppeeee command. The default is nnnnooooccccmmmmdddd.... ccccrrrrtttt=_n_u_m_b_e_r Pipe messages having more than _n_u_m_b_e_r lines through the command specified by the value of the _P_A_G_E_R variable. The default is nnnnooooccccrrrrtttt.... If it is set to null, the value is set to the current window size. ddddeeeebbbbuuuugggg Enable verbose diagnostics for debugging. Messages are not delivered. The default is nnnnooooddddeeeebbbbuuuugggg.... ddddooootttt The binary option _d_o_t causes _m_a_i_l_x to interpret a period alone on a line as the terminator of a message you are sending. When ddddooootttt is set, a period on a line by itself during message input from a terminal also signifies end- of-file (in addition to normal end-of-file). The default is nnnnooooddddooootttt.... If iiiiggggnnnnoooorrrreeeeeeeeooooffff is set (see below), a setting of nnnnooooddddooootttt will be ignored and the period is the only method to terminate input mode. fffflllliiiipppprrrr Reverse the meanings of the RRRR and rrrr commands. The default is nnnnoooofffflllliiiipppprrrr.... hhhhoooolllldddd This option is used to hold messages in the system mailbox (instead of _m_b_o_x ) by default. iiiiggggnnnnoooorrrreeee Causes interrupt signals from your terminal to be ignored and echoed as @'s. PPPPaaaaggggeeee 11113333 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) iiiiggggnnnnoooorrrreeeeeeeeooooffff Ignore normal control-D during message input. Input can be terminated only by entering a period (.) on a line by itself or by the nnnnooooiiiiggggnnnnoooorrrreeeeeeeeooooffff.... See also ddddooootttt above. kkkkeeeeeeeepppp Prevents _m_a_i_l_x from deleting empty mailboxes when you quit. kkkkeeeeeeeeppppssssaaaavvvveeee If set, messages which are saved via the ssssaaaavvvveeee command are _n_o_t deleted from the current mailbox automatically. mmmmeeeettttoooooooo Usually, when a group is expanded that contains the sender, the sender is removed from the expansion. Setting this option causes the sender to be included in the group. oooouuuuttttffffoooollllddddeeeerrrr Cause the files used to record outgoing messages to be located in the directory specified by the ffffoooollllddddeeeerrrr variable unless the pathname is absolute. The default is nnnnoooooooouuuuttttffffoooollllddddeeeerrrr.... See the rrrreeeeccccoooorrrrdddd variable. nnnnooooaaaasssskkkkrrrroooolllloooocccckkkk Normally, when _m_a_i_l_x encounters a mailfile which is read- only locked, it interactively asks the user how he wants to proceed. This option causes _m_a_i_l_x to bypass the interactive dialog and automatically open the mailfile in read-only mode. In order to select a different automatic behaviour, this option can be used as a valued option (see below). nnnnoooohhhheeeeaaaaddddeeeerrrr Suppresses the printing of message summary lines when mailx is first invoked. nnnnoooossssaaaavvvveeee Normally, when you abort a message with two RUBOUT, _m_a_i_l_x copies the partial letter to the file ``dead.letter'' in your home directory. Setting the binary option _n_o_s_a_v_e prevents this. ppppaaaaggggeeee Insert a form-feed after each message sent through the pipe created by the ppppiiiippppeeee command. The default is nnnnooooppppaaaaggggeeee.... pppprrrroooommmmpppptttt=_s_t_r_i_n_g Set the command-mode prompt to _s_t_r_i_n_g. If _s_t_r_i_n_g is null or if nnnnoooopppprrrroooommmmpppptttt is set, no prompting will occur. The default is to prompt with the string "? ". qqqqmmmmaaaarrrrkkkkiiiisssshhhheeeellllpppp If set, ???? becomes a synonym for the hhhheeeellllpppp command. qqqquuuuiiiieeeetttt Suppresses the printing of the version when mailx is first invoked. sssshhhhoooowwwwllllaaaasssstttt If this option is set at the time when _m_a_i_l_x is first invoked, and if no new or unread messages are present in the system mailbox, _m_a_i_l_x will display the last windowful of summary lines first, and will set the current message to be the last message in the mailfile. This option only makes sense when used with the _h_o_l_d option described PPPPaaaaggggeeee 11114444 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) above. The default is nnnnooooqqqquuuuiiiieeeetttt.... sssshhhhoooowwwwmmmmssssiiiizzzzeeee If this option is set, _m_a_i_l_x will include the line count and character count on the summary line for each message. sssshhhhoooowwwwttttoooo Causes _m_a_i_l_x to display the recipient instead of sender when displaying the summary line of a message for which you were the sender (your user name appears in the From: header field). This is useful when using _m_a_i_l_x to browse or edit a file of saved outgoing mail such as is created when the _r_e_c_o_r_d option is defined (see below). vvvveeeerrrrbbbboooosssseeee Setting the option _v_e_r_b_o_s_e is the same as using the ----vvvv flag on the command line. When mail runs in verbose mode, the actual delivery of messages is displayed on the users terminal. The following options have string values: DDDDEEEEAAAADDDD Determine the pathname of the file in which to save partial messages in case of interrupts or delivery errors. The default is ddddeeeeaaaadddd....lllleeeetttttttteeeerrrr in the directory named by the _H_O_M_E variable. EEEEDDDDIIIITTTTOOOORRRR Pathname of the text editor to use in the eeeeddddiiiitttt command and and ~~~~eeeehhhh escapes. This defaults to the value of the _E_D_I_T_O_R environment variable. HHHHOOOOMMMMEEEE The pathname of your home directory. This defaults to the value of the _H_O_M_E environment variable. LLLLIIIISSSSTTTTEEEERRRR Determine a string representing the command for writing the contents of the ffffoooollllddddeeeerrrr directory to standard output when the ffffoooollllddddeeeerrrrssss command is given. Any string acceptable as a _c_o_m_m_a_n_d__s_t_r_i_n_g operand to the _s_h ----cccc command is valid. If this variable is null or not set, the output command will be _l_s. The default value is unset. MMMMAAAAIIIILLLLRRRRCCCC Determine the pathname of the start-up file. The default is ....mmmmaaaaiiiillllrrrrcccc in the _H_O_M_E directory. MMMMBBBBOOOOXXXX Determine a pathname of the file to save messages from the system mailbox that have been read. The eeeexxxxiiiitttt command overrides this function, as will saving the message explicitly in another file. The default is mmmmbbbbooooxxxx in the directory named by the _H_O_M_E variable. PPPPAAAAGGGGEEEERRRR Pathname of your pager to use in the MMMMoooorrrreeee or mmmmoooorrrreeee commands, or if the _c_r_t option is selected. If not defined, this defaults to the value of the _P_A_G_E_R environment variable. If the _P_A_G_E_R environment variable is not defined either, then _m_o_r_e(1) is the default. PPPPaaaaggggeeee 11115555 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) SSSSHHHHEEEELLLLLLLL Pathname of the shell to use in the !!!! command and the ~! escape. This defaults to the value of the _S_H_E_L_L environment variable. TTTTMMMMPPPPDDDDIIIIRRRR The directory to use for temporary files. This defaults to the value of the _T_M_P_D_I_R environment variable. If the _T_M_P_D_I_R environment variable is not defined either, then /_t_m_p is the default. VVVVIIIISSSSUUUUAAAALLLL Pathname of the text editor to use in the vvvviiiissssuuuuaaaallll command and ~~~~vvvv and ~~~~vvvvhhhh escapes. If this variable is null or not set, the full-screen editor will be vvvviiii.... ccccoooommmmmmmmaaaannnndddd:::: Allows the user to ``alias'' commands. Syntax is: set command:_x=_y Where _x is a new name for the command and _y is the original command. For example: set command:ls=header defines a new command ``ls'' which is equivalent to the existing ``header'' command. ccccrrrrtttt If _c_r_t is used as a valued option (see above for a description of how _c_r_t is used as a binary option), it is used as a threshold to determine how long a message must be before the user's pager is used to read it. In effect, this allows the user to override the current window size which would be used in the case of the binary _c_r_t option. eeeessssccccaaaappppeeee If defined, the first character of this option gives the character to use in the place of ~ to denote escapes. ffffoooollllddddeeeerrrr=_d_i_r_e_c_t_o_r_y The default directory for saving mail files. User- specified filenames beginning with a plus sign (+) will be expanded by preceding the filename with this directory name to obtain the real pathname. If _d_i_r_e_c_t_o_r_y does not start with a slash (/), the contents of _H_O_M_E will be prefixed to it. The default is nnnnooooffffoooollllddddeeeerrrr.... If ffffoooollllddddeeeerrrr is unset or set to null, user-specified filenames beginning with ++++ refer to files in the current directory that begin with the literal ++++ character. See also oooouuuuttttffffoooollllddddeeeerrrr below. The ffffoooollllddddeeeerrrr value need not affect the processing of the files named in _M_B_O_X and _D_E_A_D. iiiinnnnddddeeeennnnttttpppprrrreeeeffffiiiixxxx=_s_t_r_i_n_g If defined, gives the string which will be prepended to each inserted line when using the ~~~~mmmm command to insert text from a previous message into the current message PPPPaaaaggggeeee 11116666 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) being composed. If not defined a tab will be the default. nnnnooooaaaasssskkkkrrrroooolllloooocccckkkk Normally, when _m_a_i_l_x encounters a mailfile which is read- only locked, it interactively asks the user how he wants to proceed. This option causes _m_a_i_l_x to bypass the interactive dialog and automatically proceed as follows: If set to "R" or "r", _m_a_i_l_x will open the mailfile read- only. If set to "W" or "w", _m_a_i_l_x will forcibly acquire the lock and open the mailfile read-write. rrrreeeeccccoooorrrrdddd If defined, gives the pathname of the file used to record all outgoing mail. If not defined, then outgoing mail is not so saved. The default is nnnnooooqqqquuuuiiiieeeetttt.... rrrreeeeppppllllyyyyttttoooo If defined, gives the address which should be entered into the Reply-To: header field for all outgoing mail. ssssaaaavvvveeee Enable saving of messages in the dead-letter file on interrupt or delivery error. See the variable _D_E_A_D for the location of the dead-letter file. The default is ssssaaaavvvveeee.... sssseeeennnnddddmmmmaaaaiiiillll If defined, gives the full pathname of the mail transfer agent program to use to send mail. If not set, /_u_s_r/_l_i_b/_s_e_n_d_m_a_i_l will be used. It is usually unnecessary to set this option. ssssiiiiggggnnnn=_s_t_r_i_n_g Set the variable inserted into the text of a message when the aaaa command escape is given. The default is nnnnoooossssiiiiggggnnnn.... The character sequences _\\\\_tttt and _\\\\_nnnn are recognized in the variable as tab and newline characters, respectively. SSSSiiiiggggnnnn=_s_t_r_i_n_g Set the variable inserted into the text of a message when the A command escape is given. The default is _nnnn_oooo_SSSS_iiii_gggg_nnnn. The character sequences _\\\\_tttt and _\\\\_nnnn will be recognized in the variable as tab and newline characters, respectively. ttttoooopppplllliiiinnnneeeessss If defined, gives the number of lines of a message to be printed out with the ttttoooopppp command; normally, the first five lines are printed. FFFFIIIILLLLEEEESSSS $HOME/mbox Your saved mail (unless the hhhhoooolllldddd option is set). $HOME/dead.letter File where the text of the last aborted message will be saved (unless the nnnnoooossssaaaavvvveeee option is set). Note that in the event of a delivery failure, _s_e_n_d_m_a_i_l may append the failed message to ``dead.letter.'' This may result in multiple messages being present in ``dead.letter.'' PPPPaaaaggggeeee 11117777 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) $HOME/.mailrc File giving initial mail commands. $HOME/.lsignature File to append to outgoing local mail. $HOME/.rsignature File to append to outgoing remote mail. $HOME/.signature File to append to outgoing mail if .lsignature and .rsignature do not exist. $TMPDIR/R* Misc. temporary files. $TMPDIR/Message* Temporary editor files. /usr/mail/* System mail directory. /usr/mail/_u_s_e_r System mailbox for _u_s_e_r. /usr/mail/_u_s_e_r.lock Lock for _u_s_e_r's mailbox. /usr/mail/_u_s_e_r.rolock Read-only lock for _u_s_e_r's mailbox. Used to prevent file contention between multiple mailx instances. /usr/lib/mailx.help* Help files. /usr/lib/Mail.rc System initialization file. /usr/sbin/mailx mailx program. SSSSEEEEEEEE AAAALLLLSSSSOOOO mail_att(1), mail_bsd(1), sendmail(1M). Internet RFC 822 - Standard for the Format of Internet Text Messages. WWWWAAAARRRRNNNNIIIINNNNGGGGSSSS _m_a_i_l_x recognizes and acts upon tilde escapes in the body of the message being collected on standard input regardless of whether or not standard input is connected to a tty. If you redirect _m_a_i_l_x '_s standard input to come from a file or pipe: mailx someuser < msgfile or cat msgfile | mailx someuser you must take care to insure that no line of msgfile inadvertently begins with a '~' character or _m_a_i_l_x will produce unwanted results. Note that there is nothing wrong with imbedding tilde escapes in the body of such a msgfile provided you know what you are doing. Such imbedded tilde escapes are useful for setting the Cc: list, arranging return receipts, and performing other functions not available via command line options. PPPPaaaaggggeeee 11118888 MMMMAAAAIIIILLLLXXXX((((1111)))) MMMMAAAAIIIILLLLXXXX((((1111)))) BBBBUUUUGGGGSSSS There are many flags that are not documented here. Most are not useful to the general user. PPPPaaaaggggeeee 11119999